home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Tool Chest / QuickDraw / Bitblitz 1.0 / LibHeaders / AutoCursor.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-14  |  2.3 KB  |  77 lines  |  [TEXT/KAHL]

  1. #ifndef __AUTOCURSOR__
  2. #define __AUTOCURSOR__
  3.  
  4. /*---------------------------------------------------------------------------------------
  5. //    File:        AutoCursor.h
  6. //    Date:        July 12, 1989
  7. //
  8. //    Mods:        Apr  16, 1990         JMP        Completely revised.
  9. //
  10. //    By Mike Puckett, Macintosh CPU Software Quality, x4-1332.
  11. //    © 1989 - 1990, Apple Computer, Inc.
  12. //---------------------------------------------------------------------------------------
  13. */
  14.  
  15. /* Data Structures ----------------------------------------------------------------------
  16. */
  17. typedef struct ACRecord                            /* ACRecord is NOT public at this time.    */
  18. *AutoCursor;
  19.  
  20. #define kACMinThreshTicks    60L                    /* For some machines, <1 sec looks bad.    */
  21. #define kACStdThreshTicks    120L                /* About every 2 seconds.                */
  22. #define kACStdSpinTicks        12L                    /* About every 1/5th second.            */
  23.  
  24. #define rACStdACURID        (short)256            /* Seemed like a good number to me.        */
  25.  
  26. /* The WaitNextEvent yield time should be SOMEWHAT less than the threshold value,
  27. // otherwise the timer will go off too soon and the animation will kick in when
  28. // the app is NOT busy.  The following formula seems to work pretty well when
  29. // tt >= 120L (tt is threshold ticks).
  30. */
  31. #define AC_WNE_YIELD(tt)    ((tt) >> 2)
  32.  
  33. /* Constants for use with AutoCursorCommand()…
  34. */
  35. enum
  36. {    acUpdtThreshTicks = 1,
  37.     acUpdtSpinTicks,
  38.     acGetThreshTicks,
  39.     acGetSpinTicks,
  40.     acForceBusy,
  41.     acForceIdle
  42.     };
  43.  
  44. /* AutoCursorCommand() Macros…
  45. */
  46. #define AC_GETTHRESTICKS    acGetThreshTicks,    nil
  47. #define AC_GETSPINTICKS        acGetSpinTicks,        nil
  48. #define AC_FORCEBUSY        acForceBusy,        nil
  49. #define AC_FORCEIDLE        acForceIdle,        nil
  50.  
  51. /* The Routines  ------------------------------------------------------------------------
  52. */
  53. #ifdef __safe_link
  54. extern "C" {
  55. #endif
  56.  
  57. extern pascal    AutoCursor        InstAutoCursor(        short            acurRsrcID,
  58.                                                     unsigned long    threshTicks,
  59.                                                     unsigned long    spinTicks);
  60.  
  61. extern pascal    void            PrmeAutoCursor(        AutoCursor        autoCursor);
  62. extern pascal    void            RmveAutoCursor(        AutoCursor        autoCursor);
  63.  
  64. extern pascal    void            ImmedAutoCursor(    AutoCursor        autoCursor);
  65.  
  66. extern pascal    void            SuspendAutoCursor(    AutoCursor        autoCursor);
  67. extern pascal    void            ResumeAutoCursor(    AutoCursor        autoCursor);
  68.  
  69. extern pascal    long            AutoCursorCommand(    AutoCursor        autoCursor,
  70.                                                     short            acCommand,
  71.                                                     long            acParam);
  72.  
  73.  
  74. #ifdef __safe_link
  75. }
  76. #endif
  77. #endif /* __AUTOCURSOR__ */